//
//  registerText.m
//  QuickCure1
//
//  Created by apple on 2016/11/3.
//  Copyright © 2016年 maoge. All rights reserved.
//

#import "registerText.h"

@implementation registerText


- (instancetype)init{
    
    self = [super init];
    if (self) {
        UIImageView *imageView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"product_img_icon_xieyi.png"]];
        self.leftView = imageView;
        self.leftViewMode = UITextFieldViewModeAlways;
    }
    return self;
}

//图片与边框的距离
- (CGRect)leftViewRectForBounds:(CGRect)bounds{
    
    CGRect iconRect = [super leftViewRectForBounds:bounds];
    iconRect.origin.x += 15;
    return iconRect;
}

//文字与输入框的距离
- (CGRect)textRectForBounds:(CGRect)bounds{
    
    return CGRectInset(bounds, 45, 0);
}

- (CGRect)editingRectForBounds:(CGRect)bounds{
    
    return CGRectInset(bounds, 45, 0);
    
}


@end
